Skip to content

Fall back to other methods of schema loading when one fails#533

Merged
shadaj merged 1 commit intomasterfrom
fallback-schema-loading
Aug 6, 2018
Merged

Fall back to other methods of schema loading when one fails#533
shadaj merged 1 commit intomasterfrom
fallback-schema-loading

Conversation

@shadaj
Copy link
Copy Markdown
Contributor

@shadaj shadaj commented Aug 6, 2018

Helps in situations where one method fails like when an endpoint exists but introspection is disabled.

@shadaj shadaj self-assigned this Aug 6, 2018
@ghost ghost added the 🎉 feature New addition or enhancement to existing solutions label Aug 6, 2018
@shadaj shadaj added 🎉 feature New addition or enhancement to existing solutions and removed 🎉 feature New addition or enhancement to existing solutions labels Aug 6, 2018
@shadaj shadaj changed the title Fallback to other methods of schema loading when one fails Fall back to other methods of schema loading when one fails Aug 6, 2018
@ghost ghost added the 🎉 feature New addition or enhancement to existing solutions label Aug 6, 2018
@shadaj shadaj merged commit b48e7bf into master Aug 6, 2018
@shadaj shadaj deleted the fallback-schema-loading branch August 7, 2018 16:28
@danilobuerger
Copy link
Copy Markdown
Contributor

@shadaj this now leads to unclear error messages when fetching from a server without introspection.
Error message is now:

$ apollo schema:download --endpoint ... schema.json
 ✔ Loading Apollo config
 ✔ Fetching current schema
 ✖ Saving schema to schema.json
   → Expected undefined to be a GraphQL schema.
Error: Expected undefined to be a GraphQL schema.

previously it was:

$ apollo schema:download --endpoint ... schema.json
 ✔ Loading Apollo config
 ✖ Fetching current schema
   → Response not successful: Received status code 400
   Saving schema to schema.json
Error: Response not successful: Received status code 400

@abernix abernix restored the fallback-schema-loading branch October 3, 2018 18:32
@abernix abernix deleted the fallback-schema-loading branch October 3, 2018 18:33
abernix added a commit that referenced this pull request Oct 3, 2018
abernix added a commit that referenced this pull request Oct 3, 2018
@abernix
Copy link
Copy Markdown
Member

abernix commented Oct 4, 2018

@shadaj I've proposed reverting this in #613. I'd appreciate your thoughts on that, but it seems like this approach won't work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🎉 feature New addition or enhancement to existing solutions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants